<!DOCTYPE html>
<html>
<!--Made By kailuosoft.com, TEL 171 9992 9517 --><head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
	<style>
    	.width{
				width:50px;			
			}
		.black_overlay{  display: none;  position: absolute;  top: 0%;  left: 0%;  width: 100%;  height: 100%; min-height:800px;  background-color: black;  z-index:1001;  -moz-opacity: 0.8;  opacity:.80;  filter: alpha(opacity=80);  }  
		.white_content {  display: none;  position: absolute;  top: 25%;  left: 40%; height:300px; width:400px;  padding: 16px;   background-color: white;  z-index:1002;  overflow: auto;  } 
	
		.black_overlay1{  display: none;  position: absolute;  top: 0%;  left: 0%;  width: 100%;  height: 100%; min-height:800px;  background-color: black;  z-index:1001;  -moz-opacity: 0.8;  opacity:.80;  filter: alpha(opacity=80);  }  
		.white_content1 {  display: none;  position: absolute;  top: 25%;  left: 40%; height:200px; width:400px;  padding: 16px;   background-color: white;  z-index:1002;  overflow: auto;  } 
    </style>

    <title>凯络科技后台管理系统</title>
    <meta name="keywords" content="">
    <meta name="description" content="">

    <link rel="shortcut icon" href="favicon.ico"> <link href="__PUBLIC__/css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
    <link href="__PUBLIC__/css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
    <link href="__PUBLIC__/css/plugins/iCheck/custom.css" rel="stylesheet">
    <!--<link href="__PUBLIC__/css/animate.min.css" rel="stylesheet">-->
    <link href="__PUBLIC__/css/style.min862f.css?v=4.1.0" rel="stylesheet">
	<link href="__PUBLIC__/css/page.css" rel="stylesheet">
    <link href="__PUBLIC__/css/new.css" rel="stylesheet">
	
    
    
    <script src="__PUBLIC__/js/jquery.min63b9.js?v=2.1.4"></script>
    <script src="__PUBLIC__/js/plugins/layer/layer.min.js"></script>
    <script src="__PUBLIC__/js/bootstrap.min14ed.js?v=3.3.6"></script>
    <script src="__PUBLIC__/js/plugins/peity/jquery.peity.min.js"></script>
    <script src="__PUBLIC__/js/content.mine209.js?v=1.0.0"></script>
    <script src="__PUBLIC__/js/plugins/iCheck/icheck.min.js"></script>
    <script src="__PUBLIC__/js/demo/peity-demo.min.js"></script>
	<script src="__PUBLIC__/js/plugins/layer/laydate/laydate.js"></script>
    
    <script src="__PUBLIC__/template_files/LodopFuncs.js"></script>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

   <script type="text/javascript">
		function page(n,s){
			var outer_iid=$('#outer_iid').val();
			var tid=$('#tid').val();
			var receiver_name=$('#receiver_name').val();
			var shifa=$('#shifa').val();
			var seller_flag=$('#seller_flag').val();
			
			var shoptitle=$('#shoptitle').val();
			var starttime=$('#starttime').val();
			var endtime=$('#endtime').val();
			var name=$('#name').val();
			var asc=$('#asc').val();
			var kuaidi1=$('#kuaidi1').val();
			var kuaidi2=$('#kuaidi2').val();
			var asc_sort=$('#asc_sort').val();
			location.href='print_order?pageNo='+n+'&pageSize='+s+'&shoptitle='+shoptitle+'&kuaidi1='+kuaidi1+'&kuaidi2='+kuaidi2+'&asc_sort='+asc_sort+'&starttime='+starttime+'&endtime='+endtime+'&name='+name+'&asc='+asc+'&outer_iid='+outer_iid+'&shifa='+shifa+'&seller_flag='+seller_flag+'&tid='+tid+'&receiver_name='+receiver_name;
	    	return false;
	    }
		 
		
		
		
	</script>
    

</head>

<body class="gray-bg"> 
    <div class="wrapper wrapper-content animated fadeInRight">
         
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>多店铺管理</h5>
                    </div>
                    <div class="ibox-content">
					     <form id="searchForm" class="form-inline" method="post" action="" >
							<div class="row" style="margin-bottom:10px;">
                            <input type='hidden' name='pageNo' value='1' />
                            <input type='hidden' name='pageSize' value='10' />
                            <input type='hidden' id='name' name='name' value='{$order.name}' />
                            <input type='hidden' id='asc' name='asc' value='{$order.asc}' />
                            <button type="button" class="btn btn-sm btn-primary qun " style="margin-left:15px;" va=""> 获取关联群号</button>
                            
                            <button type="submit" class="btn btn-sm btn-primary " style="margin-left:10px;" id="load"> 刷新 </button>
                            <button type="submit" class="btn btn-sm btn-primary danxuan" style="margin-left:10px;" va=""> 全部使用当前店铺寄件信息 </button>
                            <button type="button" class="btn btn-sm btn-primary danxuan" style="margin-left:10px;" id='del'> 取消关联群号 </button>
                            <div style="float:right;">
                            	<input class="form-control input-sm" name="group" id="group" placeholder='输入关联群号' value="<?php echo empty($group)?'':$group; ?>" style="width:300px;">
                                &nbsp;&nbsp;
                                <button type="button" class="btn btn-sm btn-primary " id="queding" style="margin-right:20px; width:100px; margin-top:5px;" va=""> 确定 </button>
                            </div>
                        	</div>
					    </form>
						
                        <table class="table table-bordered table-striped table-hover" id="msg_table">
                            <thead>
                                <tr>
                                
									
								   	<th>账号名称</th>
                                    <th>关联群号</th>
									<th>到期时间</th>
									<th>寄件信息</th>
									<th>操作</th>
                                </tr>  
                            </thead> 
                            <tbody>
                            	<foreach name ='address' item = 'val'>
                            	<tr>
                                	
                                    <td>{$val['visitor_nick']}</td>
                                    <td>{$val['group_id']}</td>
                                    <td>{$val['deadline']}</td>
                                    <td>{$val['contact']}&nbsp;&nbsp;{$val['province']} {$val['city']} {$val['district']} {$val['town']} {$val['address']} {$val['phone']}</td>
                                    <td>
                                    	<a class="btn btn-sm btn-primary edit" href="{:U('Address/index',array('id'=>$val['id'],'visitor_id'=>$val['visitor_id']))}" target="_blank" >编辑信息</a>
                                        &nbsp;&nbsp;
                                        <button type="button"   class="btn btn-sm btn-primary tongbu" >同步地址</button>
                                    </td>
                                </tr>
                                </foreach>
                            
                          </tbody>
                        </table>
                       
                      
                       <div id="light" class="white_content"> 
                            <table width="100%">
                                <thead>
                                    <th><h3>店铺群号生成</h3></th>
                                </thead>
                                <tr>
                                	<td align="center" style="padding-top:20px;">
                                    	<input class="form-control input-sm" name="zu" id="zu" value="" style="width:300px; height:50px; font-size:16px;">
                                    </td>
                                </tr>
                                <tfoot valign="bottom" align="center">
                                    <td style="padding-top:50px;" >
                                    	<button type="button" class="btn btn-sm btn-primary tongzu"  va="" style="margin-right:10px;"> 生成同组群号 </button>
                                        <a href="javascript:void(0)" class="btn btn-sm btn-primary" onclick="document.getElementById('light').style.display='none';document.getElementById('fade').style.display='none';window.location.reload();"> 
                                            关闭
                                        </a> 
                                    </td>
                                </tfoot>
                            </table>
                          
                        </div>
                        <div id="fade" class="black_overlay"></div> 
                        
                        
                        
                        <div id="light1" class="white_content1"> 
                            <table width="100%">
                                <thead>
                                    <th><h2>提示</h2></th>
                                </thead>
                                <tr>
                                	<td align="center" style="padding-top:20px; font-size:16px; font-weight:700;" id="content_xuan">
                                    	
                                    </td>
                                    <input type="hidden" id="group_id" >
                                </tr>
                                <tfoot valign="bottom" align="center">
                                    <td style="padding-top:50px;" >
                                    	<button type="button" class="btn btn-sm btn-primary" id="gl_group" style="margin-right:10px;"> 确定 </button>
                                        <a href="javascript:void(0)" class="btn btn-sm btn-primary" onclick="document.getElementById('light1').style.display='none';document.getElementById('fade1').style.display='none';"> 
                                            取消
                                        </a> 
                                    </td>
                                </tfoot>
                            </table>
                          
                        </div>
                        <div id="fade1" class="black_overlay1"></div> 
                        
                        
                       
						
	<!-- 分页代码 -->
<div class="fixed-table-pagination" style="display: block;">
	<div class="pull-left pagination-detail">
		<span class="pagination-info">显示第 1 到第 {$count.pageSize} 条记录，总共 {$count.count} 条记录</span>
		<span class="page-list">每页显示 
			<span class="btn-group dropup">
				<button type="button" class="btn btn-default  btn-outline dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
					<span class="page-size">{$count.pageSize}</span> <span class="caret"></span></button>
					<ul class="dropdown-menu" role="menu">
					<li class="<if condition=" $count.pageSize eq 10"> active </if>"><a href="javascript:page(1,10,'');">10</a></li>
					<li class="<if condition=" $count.pageSize eq 25"> active </if>"><a href="javascript:page(1,25,'');">25</a></li>
					<li class="<if condition=" $count.pageSize eq 50"> active </if>"><a href="javascript:page(1,50,'');">50</a></li>
					<li class="<if condition=" $count.pageSize eq 100"> active </if>"><a href="javascript:page(1,100,'');">100</a></li>
					</ul>
					</span> 条记录</span>
				</div>
				<div class="pull-right pagination-roll">
				<ul class="pagination pagination-outline">
					<li class="paginate_button <if condition=" $count.pageNo eq 1"> previous disabled </if>"><a href="javascript:" onClick="page(1,{$count.pageSize},'');"><i class="fa fa-angle-double-left"></i></a></li>
					<li class="paginate_button <if condition=" $count.pageNo eq 1"> previous disabled </if>"><a href="javascript:" onClick="page({$count.pageNo}-1,{$count.pageSize},'');"><i class="fa fa-angle-left"></i></a></li>
					 <if condition=" $count.countpage gt 10 "> 
					 	<if condition=" $count.pageNo lt 5 "> 
							<li class="paginate_button "><a href="javascript:" onClick="page(1,{$count.pageSize},'');" id="<?php echo ($count['pageNo']==1)?'current':'' ?>">1</a></li>
							<li class="paginate_button "><a href="javascript:" onClick="page(2,{$count.pageSize},'');" id="<?php echo ($count['pageNo']==2)?'current':'' ?>">2</a></li>
							<li class="paginate_button "><a href="javascript:" onClick="page(3,{$count.pageSize},'');" id="<?php echo ($count['pageNo']==3)?'current':'' ?>">3</a></li>
							<li class="paginate_button "><a href="javascript:" onClick="page(4,{$count.pageSize},'');" id="<?php echo ($count['pageNo']==4)?'current':'' ?>">4</a></li>
							<li class="paginate_button "><a href="javascript:" onClick="page(5,{$count.pageSize},'');" id="<?php echo ($count['pageNo']==5)?'current':'' ?>">5</a></li>
							<li class="paginate_button "><a href="javascript:" onClick="page(6,{$count.pageSize},'');" id="<?php echo ($count['pageNo']==6)?'current':'' ?>">6</a></li>
							<li class="paginate_button "><a href="javascript:" onClick="page(7,{$count.pageSize},'');" id="<?php echo ($count['pageNo']==7)?'current':'' ?>">7</a></li>
							<li class="paginate_button "><a href="javascript:" onClick="page(8,{$count.pageSize},'');" id="<?php echo ($count['pageNo']==8)?'current':'' ?>">8</a></li>
							<li class="paginate_button disabled"><a href="javascript:">...</a></li>
							<li class="paginate_button "><a href="javascript:" onClick="page({$count.countpage},{$count.pageSize},'');">{$count.countpage}</a></li>
						<elseif condition="$count.pageNo lt $count.num and $count.pageNo egt 5"/>
							<li class="paginate_button "><a href="javascript:" onClick="page(1,{$count.pageSize},'');">1</a></li>
							<li class="paginate_button disabled"><a href="javascript:">...</a></li>
							<li class="paginate_button "><a href="javascript:" onClick="page(<?php echo $count['pageNo']-3; ?>,{$count.pageSize},'');"><?php echo $count['pageNo']-3; ?></a></li>
							<li class="paginate_button "><a href="javascript:" onClick="page(<?php echo $count['pageNo']-2; ?>,{$count.pageSize},'');"><?php echo $count['pageNo']-2; ?></a></li>
							<li class="paginate_button "><a href="javascript:" onClick="page(<?php echo $count['pageNo']-1; ?>,{$count.pageSize},'');"><?php echo $count['pageNo']-1; ?></a></li>
							<li class="paginate_button "><a href="javascript:" onClick="page({$count.pageNo},{$count.pageSize},'');" id='current'><?php echo $count['pageNo']; ?></a></li>
							<li class="paginate_button "><a href="javascript:" onClick="page(<?php echo $count['pageNo']+1; ?>,{$count.pageSize},'');"><?php echo $count['pageNo']+1; ?></a></li>
							<li class="paginate_button "><a href="javascript:" onClick="page(<?php echo $count['pageNo']+2; ?>,{$count.pageSize},'');"><?php echo $count['pageNo']+2; ?></a></li> 
							<li class="paginate_button "><a href="javascript:" onClick="page(<?php echo $count['pageNo']+3; ?>,{$count.pageSize},'');"><?php echo $count['pageNo']+3; ?></a></li>
							<li class="paginate_button disabled"><a href="javascript:">...</a></li>
							<li class="paginate_button "><a href="javascript:" onClick="page({$count.countpage},{$count.pageSize},'');">{$count.countpage}</a></li>
						<else />
							<li class="paginate_button "><a href="javascript:" onClick="page(1,{$count.pageSize},'');">1</a></li>
							<li class="paginate_button disabled"><a href="javascript:">...</a></li>
							<li class="paginate_button "><a href="javascript:" onClick="page(<?php echo $count['countpage']-4; ?>,{$count.pageSize},'');" id="<?php echo ($count['pageNo']==($count['countpage']-4))?'current':'' ?>"><?php echo $count['countpage']-4; ?></a></li>
							<li class="paginate_button "><a href="javascript:" onClick="page(<?php echo $count['countpage']-3; ?>,{$count.pageSize},'');" id="<?php echo ($count['pageNo']==($count['countpage']-3))?'current':'' ?>"><?php echo $count['countpage']-3; ?></a></li>
							<li class="paginate_button "><a href="javascript:" onClick="page(<?php echo $count['countpage']-2; ?>,{$count.pageSize},'');" id="<?php echo ($count['pageNo']==($count['countpage']-2))?'current':'' ?>"><?php echo $count['countpage']-2; ?></a></li>
							<li class="paginate_button "><a href="javascript:" onClick="page(<?php echo $count['countpage']-1; ?>,{$count.pageSize},'');" id="<?php echo ($count['pageNo']==($count['countpage']-1))?'current':'' ?>"><?php echo $count['countpage']-1; ?></a></li>
							<li class="paginate_button "><a href="javascript:" onClick="page(<?php echo $count['countpage']; ?>,{$count.pageSize},'');" id="<?php echo ($count['pageNo']==$count['countpage'])?'current':'' ?>"><?php echo $count['countpage']; ?></a></li>
						</if>
					<else />
						<for start="0" end="$count.countpage" name='i'>
							<li class="paginate_button <if condition=" $count.pageNo eq $i+1"> previous disabled </if>"><a href="javascript:" onClick="page({$i+1},{$count.pageSize},'');" id="<?php echo ($count['pageNo']==($i+1))?'current':'' ?>">{$i+1}</a></li>
						</for>
					</if>
					<li class="paginate_button next <if condition=" $count.pageNo egt $count.countpage"> previous disabled </if>"><a href="javascript:" onClick="page({$count.pageNo}+1,{$count.pageSize},'');"><i class="fa fa-angle-right"></i></a></li>
					<li class="paginate_button next <if condition=" $count.pageNo egt $count.countpage"> previous disabled </if>"><a href="javascript:" onClick="page({$count.countpage},{$count.pageSize},'');"><i class="fa fa-angle-double-right"></i></a></li>
				</ul>
			</div>
		</div>
	<br/>
	<br/>
	</div>
	</div>
</div>
<script> 
	$('#load').click(function(){
		window.location.reload();
	})
	
	$('#del').click(function(){
		$.ajax({
             type: "GET",
             url: "{:U('Print/group_del')}",
			 data:"",
			 dataType: "json",
			 success: function(data){ 
			  
				if(data['resu'] == 'success'){
					alert("取消成功！");
				}else{
					alert("取消失败！");
				}
				window.location.reload();
			}
		})
	})
	
	$('.qun').click(function(){
		$('#light').css('display','block');
		$('#fade').css('display','block');
	})
	
	$('.tongzu').click(function(){
		$.ajax({
             type: "GET",
             url: "{:U('Print/tongzu')}",
			 data:"",
			 dataType: "json",
			 success: function(data){ 
				if(data['resu'] == 'success'){
					$('#zu').val(data['group_id']);
				}else{
					alert("生成失败！");
				}
				
			}
		})
	
	})
	
	$('#queding').click(function(){
		var group = $('#group').val();
		
		if(group == ''){
			alert('请输入店铺关联码！');
		}else{
			$.ajax({
				type: "GET",
				url: "{:U('Print/guanlian')}",
			 	data:"group="+group,
			 	dataType: "json",
			 	success: function(data){ 
					if(data['resu'] == 'success'){ 
						var str = "确定和店家'"+data['visitor_nick']+"'关联吗?";
						$('#content_xuan').html(str);
						$('#group_id').val(data['group_id']);
						$('#light1').css('display','block');
						$('#fade1').css('display','block');
						
					}else{
						alert("无效的关联号！");	
					}
					
				}
			})
		}
	})
	
	$('#gl_group').click(function(){
		$('#light1').css('display','none');
		$('#fade1').css('display','none');
		 
		var group_id =$('#group_id').val();
		$.ajax({
			type: "GET",
				url: "{:U('Print/group')}",
			 	data:"group_id="+group_id,
			 	dataType: "json",
			 	success: function(data){ 
					if(data['resu'] == 'success'){
						alert("关联成功！");
					}
					if(data['resu'] == 'error'){
						alert("不能关联自己！");
					}
					if(data['resu'] == 'error1'){
						alert("关联不成功！");
					}
					window.location.reload();
				}
		})
		 
		
	})

</script>

<object id="LODOP_OB" width="0" height="0" style="position:absolute;left:0px;top:-10px;" classid="clsid:2105C259-1E0C-4534-8141-A753534CB4CA"></object>
<object id="LODOP_EM" width="0" height="0" style="position:absolute;left:0px;top:-10px;" type="application/x-print-lodop"></object>

              
                    </div>
                </div>
            </div>
             
        </div>
         
    </div>
   
	

    <!--<div style="display:none"><script language="javascript" type="text/javascript" src="http://js.users.51.la/17825721.js"></script>-->
<noscript><a href="http://www.51.la/?17825721" target="_blank"><img alt="&#x6211;&#x8981;&#x5566;&#x514D;&#x8D39;&#x7EDF;&#x8BA1;" src="http://img.users.51.la/17825721.asp" style="border:none" /></a></noscript></div>
</body>
<!--Made By kailuosoft.com, TEL 171 9992 9517 -->
<script  type="text/javascript"  src="http://g.tbcdn.cn/sj/securesdk/0.0.3/securesdk_v2.js"  id="J_secure_sdk_v2" data-appkey="23416550"></script>
</html>
